home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / sys / amiga / hardware-part1 / 8660 < prev    next >
Encoding:
Text File  |  1996-08-05  |  6.7 KB  |  256 lines

  1. Path: news.internetMCI.com!news-admin
  2. From: dgentry@vlsi4.racal.com (Dave Gentry)
  3. Newsgroups: comp.sys.amiga.graphics,comp.sys.amiga.hardware
  4. Subject: AGX docs
  5. Date: Fri, 29 Mar 1996 18:15:38 GMT
  6. Organization: InternetMCI
  7. Message-ID: <4jgupu$4q9@news.internetmci.com>
  8. NNTP-Posting-Host: rdgw.racal.com
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. Take a look at what I found:
  12.  
  13.  
  14.  
  15. AGX Module programming information
  16. Copyright (C) 1995 AUSTEX SOFTWARE
  17. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  18.  
  19. OVERVIEW
  20.  
  21. The AGX module is a device which plugs into the video port of any
  22. Amiga. It
  23. has a video pass-through for standard Amiga screens and accepts
  24. standard
  25. Amiga video monitor signals.
  26.  
  27. The device can convert out-going video signals from the video port
  28. into byte per
  29. pixel format or chunky pixels. Resolutions range from 160, 320 on
  30. OCS/ECS Amiga
  31. machines to 160,320 and 640 for AGA compatible machines. Combinations
  32. of these
  33. outputs may be mixed on one screen in a similar fashion to 'viewports'
  34. on the
  35. Amiga.
  36.  
  37. The Amiga screen for a 320 resolution is a 640 hires screen in four
  38. bitplanes.
  39. Each bitplane is represented at the video port by the RGBI signals. As
  40. each
  41. bit of video information from the RGBI lines is output, it is stored
  42. into one
  43. of four shift registers where the data is then latched in byte format.
  44. As the
  45. next four bytes are fetched, the current four bytes can be displayed
  46. in sequence
  47. without any loss in data integrity.
  48.  
  49.  
  50. ACTIVATING
  51.  
  52. The device is activated by setting the GENLOCK_AUDIO flag in the
  53. BPLCON0 register
  54. for each line that the chunky mode is on. ( BPLCON0 = $100,
  55. GENLOCK_AUDIO = $100
  56. (bit8) ) This bit must remain on for each video line during the chunky
  57. screen. If
  58. the bit is cleared for one video line, the AGX device will clear the
  59. mode and the
  60. set the clock speed back to default. Doing this allows more than one
  61. type of 
  62. resolution mode per screen.
  63.  
  64. Usually, for the first few lines of the screen the 'hidden'
  65. programming information
  66. such as color palette, chunky mask, and conversion speed may by
  67. programmed. Once
  68. this has been done, the 'chunky enabled' sequence is written to the
  69. screen to allow
  70. the conversion process to take place.
  71.  
  72.  
  73. BITPLANE FORMAT
  74.  
  75. The format of the screen data can be handled by the axchunky library
  76. routines supplied
  77. with the device. This allows the user to set up all the data without
  78. specific knowledge
  79. of the current screen format etc.., but for those who wish to write
  80. directly to the screen;
  81.  
  82.     Pre-Chunky data format.
  83.         Bitplane    Function        
  84.         3 2 1 0        -------------------------------------
  85.  
  86.         0 0 0 x     Reserved
  87.         0 0 1 x        Reserved
  88.         0 1 0 0        Reserved
  89.         0 1 0 1        Chunky mode enable
  90.         0 1 1 0     Clock select bit 0 set
  91.         0 1 1 1        Clock select bit 1 set
  92.         1 0 0 d     Pixel address register
  93.         1 0 1 d        Color palette RAM
  94.         1 1 0 d        Pixel read mask register
  95.         1 1 1 x        Reserved
  96.         
  97.               x = Don't care    d = data (one byte)
  98.  
  99.     Screen data format type 1. OCS/ECS: 160,320 or AGA 160,320,640
  100.     
  101.         Bitplane 0    Pixel 0, 4,  8, 12, ...
  102.         Bitplane 1    Pixel 1, 5,  9, 13, ...
  103.         Bitplane 2    Pixel 2, 6, 10, 14, ...    
  104.         Bitplane 3    Pixel 3, 7, 11, 15, ...    
  105.         
  106.     Screen data format type 2. ECS/AGA: 160 only
  107.         
  108.         Bitplane 0    Pixel 0, 1, 2, 3, ...
  109.         
  110.         (this screen mode would be defined as a single bitplane
  111.          super-hires screen with bitplanes 1-3 pointing to bitplane 0)
  112.          
  113.  
  114. The normal sequence for the 'hidden programming' section is;
  115.  
  116. 1. Set the clock speed
  117. 2. Set the pixel read mask register (usually $ff)
  118. 3. Set the pixel address register (usually $00)
  119. 4. Write the palette information
  120. 5. Enable chunky mode
  121.  
  122.  
  123. RAMDAC
  124.  
  125. The AGX module uses a simple RAMDAC to generate the new RGB signals.
  126. The RAMDAC
  127. contains some palette RAM, a pixel mask register, control circuitry
  128. and a fast
  129. D/A converter.
  130.  
  131. The pixel mask register can be used to control a psuedo bitplane
  132. depth, e.g.
  133. setting the pixel mask register to $3f gives the effect of 6 bitplanes
  134. worth of
  135. data. Normally this register would be set to $ff for 256 colors.
  136.  
  137. The pixel address register is normally set to the starting color for
  138. the
  139. palette writes. Normally set this to $00.
  140.  
  141. The palette RAM is written in triplet sets. Each color is represented
  142. by an 18-bit
  143. RGB value. As each color is written, an index pointer is incremented
  144. to the next
  145. color etc...
  146.  
  147.  
  148. CONVERSION SPEED
  149.  
  150. Setting the speed determines the conversion resolution. There are only
  151. three valid
  152. settings;
  153.  
  154.     Clock Select bits:
  155.          C1 C0
  156.          0  0    : 320 resolution (default)
  157.          0  1    : 640 resolution
  158.          1  0    : 160 resolution
  159.           1  1    : Reserved (no clock)
  160.  
  161. The default clock is 320 resolution. Any time that the Genlock bit is
  162. cleared for one
  163. video line the clock bits are cleared back to the default. The chunky
  164. mode is also
  165. cleared so that new programming information may be performed.
  166.  
  167.  
  168. EXAMPLE SCREEN
  169.  
  170. An example setup for a 160 resolution screen could be;
  171.  
  172.  
  173. First row
  174. Bitplane 3:     $00,...
  175. Bitplane 2:     $ff,...
  176. Bitplane 1:     $ff,...
  177. Bitplane 0:     $ff,...
  178.          ^^ 
  179.          |
  180.          -------------- Set C1 bit, clock set to 160 mode
  181.  
  182. Second row
  183. Bitplane 3:     $ff,    $ff,    $ff,    $ff,    $ff,    $ff,    $ff,
  184. $ff,...
  185. Bitplane 2:     $ff,    $00,    $00,    $00,    $00,    $00,    $00,
  186. $00,...
  187. Bitplane 1:     $00,    $00,    $ff,    $ff,    $ff,    $ff,    $ff,
  188. $ff,...
  189. Bitplane 0:     $ff,    $00,    $00,    $00,    $00,    $10,    $10,
  190. $10,...
  191.          ^^     ^^    á^^     ^^    á^^    á^^    á^^    á^^
  192.         |    |    |    |    |    |    |    |
  193.         |    |    |    |    |    |    |    --- Color 1
  194. Blue
  195.         |    |    |    |    |    |    ----------- Color 1
  196. Green
  197.         |    |    |    |    |    ------------------- Color 1
  198. Red
  199.         |    |    |    |    --------------------------- Color 0
  200. Blue
  201.         |    |    |    ----------------------------------- Color 0
  202. Green
  203.         |    |    ------------------------------------------- Color 0
  204. Red
  205.         |    --------------------------------------------------- Starting
  206. color is 0
  207.         ----------------------------------------------------------- Pixel mask
  208. is 255
  209.  
  210.  
  211. The next few rows contain the color triplets until all 255 colors have
  212. been defined, then
  213. finally we switch the chunky display mode on. In the example, palette
  214. color 0 is $00,$00,$00
  215. palette color1 is $10,$10,$10 etc...
  216.  
  217. Nth row
  218. Bitplane 3:     ...,    $00,...
  219. Bitplane 2:     ...,    $ff,...
  220. Bitplane 1:     ...,    $00,...
  221. Bitplane 0:     ...,    $ff,...
  222.  
  223.              ^^
  224.              |
  225.              ------------------ Enable chunky mode
  226.  
  227. Nth+1 row
  228. Bitplane 3:     $00,    $04, ...
  229. Bitplane 2:     $01,    $05, ...
  230. Bitplane 1:     $02,    $06, ...
  231. Bitplane 0:     $03,    $07, ...
  232.  
  233. Would then output on the screen color 0,1,2,3,4,5,6,7 etc...  N is the
  234. number of rows required
  235. at the top of the screen to set the palette information etc.. This 160
  236. screen is for a scrambled
  237. setup. For a true linear 160 mode, the N rows of information could be
  238. setup the same with a
  239. 320 x 4 bitplane top section and a 1280 x 1bitplane super-hires screen
  240. for rows N+1 and down.
  241.  
  242. The device will remain in chunky mode as long as the GENLOCK_AUDIO bit
  243. is set for each video
  244. line. (usually only need to set this bit in the BPLCON0 register once)
  245.  
  246.  
  247.  
  248.  
  249.  
  250. Any queries may be directed to steve@ph4227b.jcu.edu.au 
  251.  
  252. Stephen J.Smith
  253. AUSTEX SOFTWARE
  254.  
  255.  
  256.